<?php

namespace App\Http\Controllers\Api;

use App\Http\Controllers\Controller;
use App\Rep\WarehouseOrderRep;
use App\Rep\WarehouseRep;
use Illuminate\Http\Request;

class WarehouseOrder extends Controller
{
    //入库单

    protected $rep;

    public function __construct(Request $request)
    {
        $this->rep = new WarehouseOrderRep();
    }

    /**添加入库单/出库单**/
    public function createWarehouseOrder(Request $request){
        $params = $request->all();
        $data = $this->rep->createWarehouseOrderRep($params);
        return re($data['code'],$data['data'],$data['msg']);
    }

    /**获取入库，出库单记录列表**/
    public function getWarehouseOrderList(Request $request){
        $params = $request->all();
        $data = $this->rep->getWarehouseOrderListRep($params);
        return re(0,$data,'success');
    }

}
